Obligatory min cost solve. Pretty decent, I think.